<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('项目任务分配')"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">

    <form class="form-horizontal m-t" id="form-post-add" th:if="${name == 'project'}">
        <div class="form-group">
            <label class="col-sm-3 control-label">项目名称：</label>
            <div class="form-control-static" th:text="${project.pname}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">项目编号：</label>
            <div class="form-control-static" th:text="${project.pid}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">订单类别：</label>
            <div class="form-control-static" th:text="${project.projectContent}">
            </div>
        </div>
        <div class="hr-line-dashed"></div>
        <!-- 客户信息栅格 -->
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>客户信息</h5>
                </div>
                <div class="ibox-content">
                    <div class="table-responsive">
                        <table class="table table-bordered table-striped">
                            <thead>
                            <tr>
                                <th>
                                    客户编号
                                </th>
                                <th>
                                    客户名称
                                </th>
                                <th>
                                    客户类型
                                </th>
                                <th>
                                    联系人
                                </th>
                                <th>
                                    职位
                                </th>
                                <th>
                                    联系方式
                                </th>
                                <th>
                                    备注
                                </th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td th:text="${project.customer.cid}"></td>
                                <td th:text="${project.customer.cname}"></td>
                                <td th:text="${project.customer.ctype}"></td>
                                <td th:text="${project.customer.contactPerson}"></td>
                                <td th:text="${project.customer.contactPersonTitle}"></td>
                                <td th:text="${project.customer.contactNum}"></td>
                                <td th:text="${project.customer.remark}"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>


                </div>
            </div>
        </div>
        <!-- 订单信息—产品清单（零售、工程订单） -->
        <!--<div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>订单信息—产品清单（零售、工程订单）</h5>
                </div>
                <div class="ibox-content">
                    <div class="table-responsive">
                        <table class="table table-bordered table-striped">
                            <thead>
                            <tr>
                                <th>
                                    产品编号
                                </th>
                                <th>
                                    产品名称
                                </th>
                                <th>
                                    数量
                                </th>
                                <th>
                                    单位
                                </th>
                                <th>
                                    单价
                                </th>
                                <th>
                                    总额
                                </th>
                                <th>
                                    备注
                                </th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td th:text="${project.product}"></td>
                                <td th:text="${project.product}"></td>
                                <td th:text="${project.product}"></td>
                                <td th:text="${project.product}"></td>
                                <td th:text="${project.product}"></td>
                                <td th:text="${project.product}"></td>
                                <td th:text="${project.product}"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>


                </div>
            </div>
        </div>-->
        <!-- 项目任务 -->
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>项目任务</h5>
                </div>
                <div class="ibox-content">
                    <div class="table-responsive">
                        <table class="table table-bordered table-striped">
                            <thead>
                            <tr>
                                <th>流程名称</th>
                                <th>流程内容</th>
                                <th>负责人</th>
                                <th>时间段</th>
                                <th>注意事项</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <th rowspan="2">概念方案设计</th>
                                <td>客户洽谈，获取设计要求<input type="hidden" name="processes[0][processContent]"
                                                      value="客户洽谈，获取设计要求"
                                                      class="form-control"></td>
                                <td>
                                    <select class="form-control" name="processes[0][personInCharge]">
                                        <option value="">--请选择负责人--</option>
                                        <option value="王梓翔">王梓翔</option>
                                        <option value="马奔">马奔</option>
                                        <option value="雷高杰">雷高杰</option>
                                        <option value="李辉">李辉</option>
                                        <option value="田璐">田璐</option>
                                    </select>
                                </td>
                                <td>
                                    <div class="input-daterange input-group">
                                        <input type="text" class="input-sm form-control datetimepicker-startTime"
                                               placeholder="yyyy-MM-dd" name="processes[0][processStartDate]">
                                        <span class="input-group-addon">到</span>
                                        <input type="text" class="input-sm form-control datetimepicker-endTime"
                                               placeholder="yyyy-MM-dd" name="processes[0][processEndDate]"/>
                                    </div>
                                </td>
                                <td><input type="text" placeholder="注意事项" class="form-control"
                                           name="processes[0][desc]"></td>
                            </tr>
                            <tr>
                                <td>概念方案调整<input type="hidden" name="processes[1][processContent]" value="概念方案调整"
                                                 class="form-control"></td>
                                <td>
                                    <select class="form-control" name="processes[1][personInCharge]">
                                        <option value="">--请选择负责人--</option>
                                        <option value="王梓翔">王梓翔</option>
                                        <option value="马奔">马奔</option>
                                        <option value="雷高杰">雷高杰</option>
                                        <option value="李辉">李辉</option>
                                        <option value="田璐">田璐</option>
                                    </select>
                                </td>
                                <td>
                                    <div class="input-daterange input-group">
                                        <input type="text" class="input-sm form-control datetimepicker-startTime"
                                               placeholder="yyyy-MM-dd" name="processes[1][processStartDate]"/>
                                        <span class="input-group-addon">到</span>
                                        <input type="text" class="input-sm form-control datetimepicker-endTime"
                                               placeholder="yyyy-MM-dd" name="processes[1][processEndDate]"/>
                                    </div>
                                </td>
                                <td><input type="text" placeholder="注意事项" class="form-control"
                                           name="processes[1][desc]"></td>
                            </tr>
                            <tr>
                                <th rowspan="2">深化方案设计</th>
                                <td>询价<input type="hidden" name="processes[2][processContent]" value="询价"
                                             class="form-control"></td>
                                <td>
                                    <select class="form-control" name="processes[2][personInCharge]">
                                        <option value="">--请选择负责人--</option>
                                        <option value="王梓翔">王梓翔</option>
                                        <option value="马奔">马奔</option>
                                        <option value="雷高杰">雷高杰</option>
                                        <option value="李辉">李辉</option>
                                        <option value="田璐">田璐</option>
                                    </select>
                                </td>
                                <td>
                                    <div class="input-daterange input-group">
                                        <input type="text" class="input-sm form-control datetimepicker-startTime"
                                               placeholder="yyyy-MM-dd" name="processes[2][processStartDate]"/>
                                        <span class="input-group-addon">到</span>
                                        <input type="text" class="input-sm form-control datetimepicker-endTime"
                                               placeholder="yyyy-MM-dd" name="processes[2][processEndDate]"/>
                                    </div>
                                </td>
                                <td><input type="text" placeholder="注意事项" class="form-control"
                                           name="processes[2][desc]"></td>
                            </tr>
                            <tr>
                                <td>深化方案汇报<input type="hidden" name="processes[3][processContent]" value="深化方案汇报"
                                                 class="form-control"></td>
                                <td>
                                    <select class="form-control" name="processes[3][personInCharge]">
                                        <option value="">--请选择负责人--</option>
                                        <option value="王梓翔">王梓翔</option>
                                        <option value="马奔">马奔</option>
                                        <option value="雷高杰">雷高杰</option>
                                        <option value="李辉">李辉</option>
                                        <option value="田璐">田璐</option>
                                    </select>
                                </td>
                                <td>
                                    <div class="input-daterange input-group">
                                        <input type="text" class="input-sm form-control datetimepicker-startTime"
                                               placeholder="yyyy-MM-dd" name="processes[3][processStartDate]"/>
                                        <span class="input-group-addon">到</span>
                                        <input type="text" class="input-sm form-control datetimepicker-endTime"
                                               placeholder="yyyy-MM-dd" name="processes[3][processEndDate]"/>
                                    </div>
                                </td>
                                <td><input type="text" placeholder="注意事项" class="form-control"
                                           name="processes[3][desc]"></td>
                            </tr>
                            <tr>
                                <th rowspan="2">工艺制图</th>
                                <td>设计图纸<input type="hidden" name="processes[4][processContent]" value="设计图纸"
                                               class="form-control"></td>
                                <td>
                                    <select class="form-control" name="processes[4][personInCharge]">
                                        <option value="">--请选择负责人--</option>
                                        <option value="王梓翔">王梓翔</option>
                                        <option value="马奔">马奔</option>
                                        <option value="雷高杰">雷高杰</option>
                                        <option value="李辉">李辉</option>
                                        <option value="田璐">田璐</option>
                                    </select>
                                </td>
                                <td>
                                    <div class="input-daterange input-group">
                                        <input type="text" class="input-sm form-control datetimepicker-startTime"
                                               placeholder="yyyy-MM-dd" name="processes[4][processStartDate]"/>
                                        <span class="input-group-addon">到</span>
                                        <input type="text" class="input-sm form-control datetimepicker-endTime"
                                               placeholder="yyyy-MM-dd" name="processes[4][processEndDate]"/>
                                    </div>
                                </td>
                                <td><input type="text" placeholder="注意事项" class="form-control"
                                           name="processes[4][desc]"></td>
                            </tr>
                            <tr>
                                <td>现场环境确认<input type="hidden" name="processes[5][processContent]" value="现场环境确认"
                                                 class="form-control"></td>
                                <td>
                                    <select class="form-control" name="processes[5][personInCharge]">
                                        <option value="">--请选择负责人--</option>
                                        <option value="王梓翔">王梓翔</option>
                                        <option value="马奔">马奔</option>
                                        <option value="雷高杰">雷高杰</option>
                                        <option value="李辉">李辉</option>
                                        <option value="田璐">田璐</option>
                                    </select>
                                </td>
                                <td>
                                    <div class="input-daterange input-group">
                                        <input type="text" class="input-sm form-control datetimepicker-startTime"
                                               placeholder="yyyy-MM-dd" name="processes[5][processStartDate]"/>
                                        <span class="input-group-addon">到</span>
                                        <input type="text" class="input-sm form-control datetimepicker-endTime"
                                               placeholder="yyyy-MM-dd" name="processes[5][processEndDate]"/>
                                    </div>
                                </td>
                                <td><input type="text" placeholder="注意事项" class="form-control"
                                           name="processes[5][desc]"></td>
                            </tr>
                            <tr>
                                <th>项目执行</th>
                                <td>家具下单<input type="hidden" name="processes[6][processContent]" value="家具下单"
                                               class="form-control"></td>
                                <td>
                                    <select class="form-control" name="processes[6][personInCharge]">
                                        <option value="">--请选择负责人--</option>
                                        <option value="王梓翔">王梓翔</option>
                                        <option value="马奔">马奔</option>
                                        <option value="雷高杰">雷高杰</option>
                                        <option value="李辉">李辉</option>
                                        <option value="田璐">田璐</option>
                                    </select>
                                </td>
                                <td>
                                    <div class="input-daterange input-group">
                                        <input type="text" class="input-sm form-control datetimepicker-startTime"
                                               placeholder="yyyy-MM-dd" name="processes[6][processStartDate]"/>
                                        <span class="input-group-addon">到</span>
                                        <input type="text" class="input-sm form-control datetimepicker-endTime"
                                               placeholder="yyyy-MM-dd" name="processes[6][processEndDate]"/>
                                    </div>
                                </td>
                                <td><input type="text" placeholder="注意事项" class="form-control"
                                           name="processes[6][desc]"></td>
                            </tr>
                            <tr>
                                <th rowspan="2">项目进场与现场协调</th>
                                <td>协商进场事宜<input type="hidden" name="processes[7][processContent]" value="协商进场事宜"
                                                 class="form-control"></td>
                                <td>
                                    <select class="form-control" name="processes[7][personInCharge]">
                                        <option value="">--请选择负责人--</option>
                                        <option value="王梓翔">王梓翔</option>
                                        <option value="马奔">马奔</option>
                                        <option value="雷高杰">雷高杰</option>
                                        <option value="李辉">李辉</option>
                                        <option value="田璐">田璐</option>
                                    </select>
                                </td>
                                <td>
                                    <div class="input-daterange input-group">
                                        <input type="text" class="input-sm form-control datetimepicker-startTime"
                                               placeholder="yyyy-MM-dd" name="processes[7][processStartDate]"/>
                                        <span class="input-group-addon">到</span>
                                        <input type="text" class="input-sm form-control datetimepicker-endTime"
                                               placeholder="yyyy-MM-dd" name="processes[7][processEndDate]"/>
                                    </div>
                                </td>
                                <td><input type="text" placeholder="注意事项" class="form-control"
                                           name="processes[7][desc]"></td>
                            </tr>
                            <tr>
                                <td>现场服务<input type="hidden" name="processes[8][processContent]" value="现场服务"
                                               class="form-control"></td>
                                <td>
                                    <select class="form-control" name="processes[8][personInCharge]">
                                        <option value="">--请选择负责人--</option>
                                        <option value="王梓翔">王梓翔</option>
                                        <option value="马奔">马奔</option>
                                        <option value="雷高杰">雷高杰</option>
                                        <option value="李辉">李辉</option>
                                        <option value="田璐">田璐</option>
                                    </select>
                                </td>
                                <td>
                                    <div class="input-daterange input-group">
                                        <input type="text" class="input-sm form-control datetimepicker-startTime"
                                               placeholder="yyyy-MM-dd" name="processes[8][processStartDate]"/>
                                        <span class="input-group-addon">到</span>
                                        <input type="text" class="input-sm form-control datetimepicker-endTime"
                                               placeholder="yyyy-MM-dd" name="processes[8][processEndDate]"/>
                                    </div>
                                </td>
                                <td><input type="text" placeholder="注意事项" class="form-control"
                                           name="processes[8][desc]"></td>
                            </tr>
                            <tr>
                                <th>技术支持</th>
                                <td>召开项目总结会议<input type="hidden" name="processes[9][processContent]"
                                                   value="召开项目总结会议"
                                                   class="form-control"></td>
                                <td>
                                    <select class="form-control" name="processes[9][personInCharge]">
                                        <option value="">--请选择负责人--</option>
                                        <option value="王梓翔">王梓翔</option>
                                        <option value="马奔">马奔</option>
                                        <option value="雷高杰">雷高杰</option>
                                        <option value="李辉">李辉</option>
                                        <option value="田璐">田璐</option>
                                    </select>
                                </td>
                                <td>
                                    <div class="input-daterange input-group">
                                        <input type="text" class="input-sm form-control datetimepicker-startTime"
                                               placeholder="yyyy-MM-dd" name="processes[9][processStartDate]"/>
                                        <span class="input-group-addon">到</span>
                                        <input type="text" class="input-sm form-control datetimepicker-endTime"
                                               placeholder="yyyy-MM-dd" name="processes[9][processEndDate]"/>
                                    </div>
                                </td>
                                <td><input type="text" placeholder="注意事项" class="form-control"
                                           name="processes[9][desc]"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script type="text/javascript">

    var prefix = ctx + "cms/pm/assign";

    function submitHandler() {
        var data = $('form-post-add').serialize();
        console.log(data);
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", data);
        }
    }

    $(function () {
        $('.form_date').datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $(".datetimepicker-startTime").datetimepicker({
            format: 'yyyy-mm-dd',
            minView: "month",
            todayBtn: true,
            autoclose: true,
        }).on('changeDate', function (event) {
            event.preventDefault();
            event.stopPropagation();
            var startTime = event.date;
            $('.datetimepicker-endTime').datetimepicker('setStartDate', startTime);
        })

        $(".datetimepicker-endTime").datetimepicker({
            format: 'yyyy-mm-dd',
            minView: "month",
            todayBtn: true,
            autoclose: true,
        })
    })

</script>
</body>
</html>